package cn.outsourcing.supermarket.service.impl;

import cn.outsourcing.supermarket.converter.HiolabsSpecificationConverter;
import cn.outsourcing.supermarket.mapper.HiolabsSpecificationMapper;
import cn.outsourcing.supermarket.po.HiolabsSpecification;
import cn.outsourcing.supermarket.service.HiolabsSpecificationService;
import cn.outsourcing.supermarket.vo.hiolabs.HiolabsSpecificationVO;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 规格表，存的是各种规格，如规格，重量，颜色，包装等 服务实现类
 *
 * @author gzkemays
 * @since 2021-10-22
 */
@Service
public class HiolabsSpecificationServiceImpl
    extends ServiceImpl<HiolabsSpecificationMapper, HiolabsSpecification>
    implements HiolabsSpecificationService {
  @Resource HiolabsSpecificationMapper specificationMapper;

  @Override
  public HiolabsSpecificationVO getSpecificationVO(Integer id) {
    return HiolabsSpecificationConverter.INSTANCE.convertToVo(specificationMapper.selectById(id));
  }
}
